package runnerworm.ui;

/**
 * <p>Title: PlayerNameEvent</p>
 * <p>Description: This event will hold the player's name.</p>
 * @author Guilherme Mauro Germoglio Barbosa
 */

public class PlayerNameEvent
    extends UserInterfaceEvent {

  /**
   * The player's name.
   */
  private String playerName;
  /**
   * Constructor. It needs the player's name.
   * @param source The event's source.
   * @param playerName The player's name.
   */
  public PlayerNameEvent(UserInterfaceEventLauncher source, String playerName) {
    super(source, PLAYER_NAME);
    this.playerName = playerName;
  }

  /**
   * Returns the player's name.
   * @return The player's name.
   */
  public String getPlayerName() {
    return playerName;
  }

}